﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FireProtectionEntry.aspx.cs"
    Inherits="MTRC.ODMS.Web.SOM.FireProtection.FireProtectionEntry" %>

<%@ Register Src="../UserControl/UCFirePortection.ascx" TagName="UCFirePortection"
    TagPrefix="uc1" %>
<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <style type="text/css">
        .title1
        {
            font-weight: bold;
            font-size: 15px;
            color: #022d72;
            font-family: "Tahoma" , "Times New Roman" , "Arial" , "Helvetica" , "sans-serif";
        }
    </style>
    <title>Operational Data Management System</title>
    <%--Add by jack 20151127 U278 when change drop down list of fire link in firelinkentry page, it ocurs a exception in win log--%>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <%--End add by jack 20151127 U278 when change drop down list of fire link in firelinkentry page, it ocurs a exception in win log--%>
    <script type="text/jscript" language="JavaScript" src="../../Javascript/CommonFunction.js"></script>
    <script type="text/javascript">
        //----------------------- Add by zengshunbo 2009-03-12 TD:1215 -----------------------
        document.onkeydown = function () {
            var k = window.event.keyCode;
            if (k == 116) {
                window.event.keyCode = 0;
                window.event.returnValue = false;
            }
        }
        //--------------------- End add by zengshunbo 2009-03-12 TD:1215 ---------------------
        //added by Nathan 2015-08-15
        function backUrl() {
            var pageID = getQueryString("PageID");

            if (pageID == "FireProtectionEnquiry") {
                window.location.href = "../FireProtection/FireProtectionEnquiry.aspx?isBack=1";
            }
            if (pageID == "OutstandingActivitiesListing") {
                window.location.href = "../AOActivityListing/OutstandingActivitiesListing.aspx?isBack=1";
            }
        }
        //End added by Nathan 2015-08-15
    </script>
</head>
<body onload="InitSettingHandovernote();">
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M1403" />
            </td>
            <td class="Page_Right">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140302" ParentMenuID="M1403" DMenuMode="CurrOnly"
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents" style="height: 16px">
                            <!--Put your contents here!-->
                            <fieldset style="clear: both; margin-bottom: 10px;">
                                <legend class="title1">
                                    <asp:Label runat="server" Font-Bold="True" Font-Size="Small" CssClass="CodeSetupCaptionText"
                                        ID="lblLegend"></asp:Label></legend>
                                <uc1:UCFirePortection ID="UCFirePortection1" runat="server"></uc1:UCFirePortection>
                            </fieldset>
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 54px">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div id="divFlowMenu" runat="server">
        <img src="../../Images/up.gif" onclick="SwitchMenu(this);" />
        <!--add flow menu items begin-->
        <div>
            <asp:Button ID="btnNew" runat="server" Text="New" OnClick="btnNew_Click" OnClientClick="return processing();" />
        </div>
        <div>
            <asp:Button ID="btnCopyAsNew" runat="server" Text="Copy As New" OnClick="btnCopyAsNew_Click"
                OnClientClick="return processing();" />
        </div>
        <div>
            <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
        </div>
        <div>
            <asp:Button ID="btnHandoverCheck" runat="server" OnClientClick="OpenHandoverCheckPage(); return false;"
                Enabled="false" TabIndex="46" />
        </div>
        <div>
            <asp:Button ID="btnVoid" runat="server" Text="Void" OnClick="btnVoid_Click" />
        </div>
        <!--add flow menu items end-->
        <%--added by Nathan 2015-08-15--%>
         <div>
            <asp:Button ID="btnBack" runat="server" Text="Back" Enabled="false" OnClientClick="javascript:backUrl();return false;" />
            </div>
           <%-- End added by Nathan 2015-08-15--%>
    </div>
    <AjaxControlToolkit:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender_FlowMenu"
        runat="server" TargetControlID="divFlowMenu" VerticalOffset="78" HorizontalOffset="1100">
    </AjaxControlToolkit:AlwaysVisibleControlExtender>
    </form>
</body>
</html>
<script type="text/javascript">
    LoadHoverEvent(document.all.divFlowMenu);
    Sys.Application.add_load(SetFlowPos);
    window.onscroll = SetFlowPos;
    window.onresize = SetFlowPos;        

      /* add by dylan 20150812 for issue u81.1  */
  function OpenHandoverCheckPage() {
    var strURL = "../Popup/PopupHandOverCheck.aspx?StationEventID="+<%=StationEventID %>;
    var returnValue = window.showModalDialog(strURL, window, "DialogWidth:400px;DialogHeight:320px;help:no;status:no;scroll:no;");
        if(returnValue!=undefined &&returnValue!="")   {
            var handOverCheck = returnValue.substring(returnValue.length - 1);
            var handOverNoteText = returnValue.substring(0,returnValue.length-1);
            if(handOverCheck=="0")   {
                 document.getElementById('UCFirePortection1_chkHandoverNot').checked = false;
            } else {
                 document.getElementById('UCFirePortection1_chkHandoverNot').checked = true;
            }
            document.getElementById("UCFirePortection1_txtHandoverNote").value=handOverNoteText; 
        }
    }
</script>
